Attribute VB_Name = "resize3"
Option Explicit
Dim objects3() As Object
Dim baifen3() As Double
Dim rowes3() As Long
Public Function setrows3(rows As Long)
  ReDim rowes3(rows)
End Function
Public Function setrowandcolumn3(row As Long, column As Long)
  rowes3(row) = column
End Function
Public Function addobject3(a As Object, i As Integer, row As Integer, tall As Long, tags As String)
  Set objects3(row, i) = a
  objects3(row, i).Top = tall
  objects3(row, i).Tag = tags
End Function
Public Function objectdimi3(i As Long, row As Long)
  Dim j As Long
  
  j = i * 2 + 1
  ReDim objects3(row, i)
  ReDim baifen3(row, j)
End Function
Public Function setbaifen3(a As Object)
  Dim ll_i, ll_j As Long
  Dim ll_a, ll_b
  For ll_j = 1 To UBound(rowes3)
    For ll_i = 1 To rowes3(ll_j) * 2 + 1
      If ll_i = 1 Then
         baifen3(ll_j, ll_i) = objects3(ll_j, ll_i).Left / a.Width
      ElseIf ll_i = rowes3(ll_j) * 2 + 1 Then
         baifen3(ll_j, ll_i) = (a.Width - objects3(ll_j, (rowes3(ll_j) - 1)).Left - objects3(ll_j, (rowes3(ll_j) - 1)).Width) / a.Width
      ElseIf (ll_i Mod 2) = 0 Then
         baifen3(ll_j, ll_i) = (objects3(ll_j, (ll_i / 2)).Width) / a.Width
      Else
         ll_a = CInt(ll_i / 2 + 0.5)
         baifen3(ll_j, ll_i) = objects3(ll_j, ll_a).Left / a.Width
      End If
    Next ll_i
  Next ll_j
End Function
Public Function objectresize3(f As Object, a As Object, w As Integer)
  Dim ll_i, ll_j As Long
  
  a.Width = f.Width - 200
  For ll_j = 1 To UBound(rowes3)
    For ll_i = 1 To rowes3(ll_j)
      objects3(ll_j, ll_i).Left = baifen3(ll_j, (ll_i * 2 - 1)) * a.Width
      If objects3(ll_j, ll_i).Tag = "Y" Then
        objects3(ll_j, ll_i).Width = baifen3(ll_j, (ll_i * 2)) * a.Width
      End If
    Next ll_i
  Next ll_j
End Function
Public Function init3()
  Call setrows3(2)
  Call setrowandcolumn3(1, 10)
  Call setrowandcolumn3(2, 9)
  Call objectdimi3(10, 2)
  Call addobject3(Form5.Label1, 1, 1, 300, "Y")
  Call addobject3(Form5.DateC1, 2, 1, 300, "Y")
  Call addobject3(Form5.Label8, 3, 1, 300, "Y")
  Call addobject3(Form5.CombDept, 4, 1, 300, "Y")
  Call addobject3(Form5.Label5, 5, 1, 350, "Y")
  Call addobject3(Form5.Label6, 6, 1, 350, "Y")
  Call addobject3(Form5.StartTime, 7, 1, 300, "Y")
  Call addobject3(Form5.Text1, 8, 1, 300, "Y")
  Call addobject3(Form5.Command1, 9, 1, 300, "Y")
  Call addobject3(Form5.Command2, 10, 1, 300, "Y")
  Call addobject3(Form5.Label2, 1, 2, 900, "Y")
  Call addobject3(Form5.DateC2, 2, 2, 900, "Y")
  Call addobject3(Form5.Label3, 3, 2, 900, "Y")
  Call addobject3(Form5.Combo1, 4, 2, 900, "Y")
  Call addobject3(Form5.Label4, 5, 2, 900, "Y")
  Call addobject3(Form5.Label7, 6, 2, 900, "Y")
  Call addobject3(Form5.EndTime, 7, 2, 900, "Y")
  Call addobject3(Form5.Command4, 8, 2, 900, "Y")
  Call addobject3(Form5.Command3, 9, 2, 900, "Y")
  Call setbaifen3(Form5.Frame1)
End Function
